/*
 Navicat MySQL Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50635
 Source Host           : 127.0.0.1:8889
 Source Schema         : jinxiaocun

 Target Server Type    : MySQL
 Target Server Version : 50635
 File Encoding         : 65001

 Date: 27/06/2019 11:33:00
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for system_auth
-- ----------------------------
DROP TABLE IF EXISTS `system_auth`;
CREATE TABLE `system_auth` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(20) DEFAULT NULL COMMENT '权限名称',
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '权限状态',
  `sort` bigint(20) unsigned DEFAULT '0' COMMENT '排序权重',
  `desc` varchar(255) DEFAULT '' COMMENT '备注说明',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_system_auth_status` (`status`) USING BTREE,
  KEY `index_system_auth_title` (`title`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='系统-权限';

-- ----------------------------
-- Records of system_auth
-- ----------------------------
BEGIN;
INSERT INTO `system_auth` VALUES (1, '库存部1', 1, 0, '库存部1', '2019-06-26 18:49:34');
INSERT INTO `system_auth` VALUES (2, '库存2部', 1, 0, '库存2部', '2019-06-27 10:38:52');
INSERT INTO `system_auth` VALUES (3, '库存3部', 1, 0, '库存3部', '2019-06-27 10:39:23');
COMMIT;

-- ----------------------------
-- Table structure for system_auth_node
-- ----------------------------
DROP TABLE IF EXISTS `system_auth_node`;
CREATE TABLE `system_auth_node` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `auth` bigint(20) unsigned DEFAULT NULL COMMENT '角色',
  `node` varchar(200) DEFAULT NULL COMMENT '节点',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_system_auth_auth` (`auth`) USING BTREE,
  KEY `index_system_auth_node` (`node`(191)) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COMMENT='系统-权限-授权';

-- ----------------------------
-- Records of system_auth_node
-- ----------------------------
BEGIN;
INSERT INTO `system_auth_node` VALUES (7, 1, 'admin');
INSERT INTO `system_auth_node` VALUES (8, 1, 'admin/node');
INSERT INTO `system_auth_node` VALUES (9, 1, 'admin/node/index');
INSERT INTO `system_auth_node` VALUES (10, 1, 'admin/node/clear');
INSERT INTO `system_auth_node` VALUES (11, 1, 'admin/node/save');
INSERT INTO `system_auth_node` VALUES (12, 1, 'admin/user');
INSERT INTO `system_auth_node` VALUES (13, 1, 'admin/user/index');
INSERT INTO `system_auth_node` VALUES (14, 1, 'admin/user/edit');
INSERT INTO `system_auth_node` VALUES (15, 1, 'admin/user/pass');
INSERT INTO `system_auth_node` VALUES (16, 1, 'admin/user/auth');
COMMIT;

-- ----------------------------
-- Table structure for system_config
-- ----------------------------
DROP TABLE IF EXISTS `system_config`;
CREATE TABLE `system_config` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) DEFAULT '' COMMENT '配置名',
  `value` varchar(500) DEFAULT '' COMMENT '配置值',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_system_config_name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8mb4 COMMENT='系统-配置';

-- ----------------------------
-- Records of system_config
-- ----------------------------
BEGIN;
INSERT INTO `system_config` VALUES (1, 'app_name', 'CommonAdmin');
INSERT INTO `system_config` VALUES (2, 'site_name', 'CommonAdmin');
INSERT INTO `system_config` VALUES (3, 'app_version', '');
INSERT INTO `system_config` VALUES (4, 'site_copy', '');
INSERT INTO `system_config` VALUES (5, 'site_icon', 'http://127.0.0.1:8000/upload/f47b8fe06e38ae99/08e8398da45583b9.png');
INSERT INTO `system_config` VALUES (7, 'miitbeian', '');
COMMIT;

-- ----------------------------
-- Table structure for system_data
-- ----------------------------
DROP TABLE IF EXISTS `system_data`;
CREATE TABLE `system_data` (
  `id` bigint(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) DEFAULT NULL COMMENT '配置名',
  `value` longtext COMMENT '配置值',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_system_data_name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='系统-数据';

-- ----------------------------
-- Records of system_data
-- ----------------------------
BEGIN;
INSERT INTO `system_data` VALUES (1, 'menudata', '[]');
COMMIT;

-- ----------------------------
-- Table structure for system_jobs
-- ----------------------------
DROP TABLE IF EXISTS `system_jobs`;
CREATE TABLE `system_jobs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `queue` varchar(100) NOT NULL,
  `payload` longtext NOT NULL,
  `attempts` bigint(20) unsigned NOT NULL DEFAULT '0',
  `reserved` bigint(20) unsigned NOT NULL DEFAULT '0',
  `reserved_at` int(10) unsigned DEFAULT NULL,
  `available_at` int(10) unsigned NOT NULL,
  `created_at` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_system_jobs_reserved` (`reserved`) USING BTREE,
  KEY `index_system_jobs_attempts` (`attempts`) USING BTREE,
  KEY `index_system_jobs_reserved_at` (`reserved_at`) USING BTREE,
  KEY `index_system_jobs_available_at` (`available_at`) USING BTREE,
  KEY `index_system_jobs_create_at` (`created_at`) USING BTREE,
  KEY `index_system_jobs_queue` (`queue`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统-任务';

-- ----------------------------
-- Table structure for system_jobs_log
-- ----------------------------
DROP TABLE IF EXISTS `system_jobs_log`;
CREATE TABLE `system_jobs_log` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(100) DEFAULT '' COMMENT '任务名称',
  `uri` varchar(500) DEFAULT '' COMMENT '任务对象',
  `later` bigint(20) unsigned DEFAULT '0' COMMENT '任务延时',
  `data` longtext COMMENT '任务数据',
  `desc` varchar(500) DEFAULT '' COMMENT '任务描述',
  `double` tinyint(1) unsigned DEFAULT '1' COMMENT '任务多开',
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '任务状态(1新任务,2任务进行中,3任务成功,4任务失败)',
  `status_at` datetime DEFAULT NULL COMMENT '任务状态时间',
  `status_desc` varchar(500) DEFAULT '' COMMENT '任务状态描述',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_system_jobs_log_status` (`status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统-任务-日志';

-- ----------------------------
-- Table structure for system_log
-- ----------------------------
DROP TABLE IF EXISTS `system_log`;
CREATE TABLE `system_log` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `node` varchar(200) NOT NULL DEFAULT '' COMMENT '当前操作节点',
  `geoip` varchar(15) NOT NULL DEFAULT '' COMMENT '操作者IP地址',
  `action` varchar(200) NOT NULL DEFAULT '' COMMENT '操作行为名称',
  `content` varchar(1024) NOT NULL DEFAULT '' COMMENT '操作内容描述',
  `username` varchar(50) NOT NULL DEFAULT '' COMMENT '操作人用户名',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='系统-日志';

-- ----------------------------
-- Records of system_log
-- ----------------------------
BEGIN;
INSERT INTO `system_log` VALUES (1, 'admin/login/index', '0.0.0.0', '系统管理', '用户登录系统成功', 'admin', '2019-06-25 19:55:23');
INSERT INTO `system_log` VALUES (2, 'admin/login/index', '0.0.0.0', '系统管理', '用户登录系统成功', 'admin', '2019-06-26 18:31:10');
INSERT INTO `system_log` VALUES (3, 'admin/login/index', '0.0.0.0', '系统管理', '用户登录系统成功', 'admin', '2019-06-27 11:08:44');
COMMIT;

-- ----------------------------
-- Table structure for system_menu
-- ----------------------------
DROP TABLE IF EXISTS `system_menu`;
CREATE TABLE `system_menu` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `pid` bigint(20) unsigned DEFAULT '0' COMMENT '父ID',
  `title` varchar(100) DEFAULT '' COMMENT '名称',
  `node` varchar(200) DEFAULT '' COMMENT '节点代码',
  `icon` varchar(100) DEFAULT '' COMMENT '菜单图标',
  `url` varchar(400) DEFAULT '' COMMENT '链接',
  `params` varchar(500) DEFAULT '' COMMENT '链接参数',
  `target` varchar(20) DEFAULT '_self' COMMENT '打开方式',
  `sort` int(11) unsigned DEFAULT '0' COMMENT '菜单排序',
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '状态(0:禁用,1:启用)',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_system_menu_node` (`node`(191)) USING BTREE,
  KEY `index_system_menu_status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8mb4 COMMENT='系统-菜单';

-- ----------------------------
-- Records of system_menu
-- ----------------------------
BEGIN;
INSERT INTO `system_menu` VALUES (1, 0, '后台首页', '', '', 'admin/index/main', '', '_self', 100, 1, '2018-09-05 17:59:38');
INSERT INTO `system_menu` VALUES (2, 0, '系统管理', '', '', '#', '', '_self', 300, 1, '2018-09-05 18:04:52');
INSERT INTO `system_menu` VALUES (3, 12, '系统菜单管理', '', 'layui-icon layui-icon-layouts', 'admin/menu/index', '', '_self', 2, 1, '2018-09-05 18:05:26');
INSERT INTO `system_menu` VALUES (5, 12, '系统用户管理', '', 'layui-icon layui-icon-username', 'admin/user/index', '', '_self', 4, 1, '2018-09-06 11:10:42');
INSERT INTO `system_menu` VALUES (6, 12, '功能节点管理', '', 'layui-icon layui-icon-template', 'admin/node/index', '', '_self', 1, 1, '2018-09-06 14:16:13');
INSERT INTO `system_menu` VALUES (7, 12, '访问权限管理', '', 'layui-icon layui-icon-vercode', 'admin/auth/index', '', '_self', 3, 1, '2018-09-06 15:17:14');
INSERT INTO `system_menu` VALUES (12, 2, '权限管理', '', '', '#', '', '_self', 20, 1, '2018-09-06 18:01:31');
COMMIT;

-- ----------------------------
-- Table structure for system_message
-- ----------------------------
DROP TABLE IF EXISTS `system_message`;
CREATE TABLE `system_message` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(20) DEFAULT '' COMMENT '消息编号',
  `title` varchar(100) DEFAULT '' COMMENT '消息名称',
  `url` varchar(500) DEFAULT '' COMMENT '跳转地址',
  `desc` varchar(500) DEFAULT '' COMMENT '消息描述',
  `node` varchar(255) DEFAULT '' COMMENT '消息授权',
  `read_state` tinyint(1) unsigned DEFAULT '0' COMMENT '读取状态',
  `read_uid` bigint(20) unsigned DEFAULT '0' COMMENT '读取用户',
  `read_at` datetime DEFAULT NULL COMMENT '读取时间',
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '消息状态',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_system_message_code` (`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统-消息';

-- ----------------------------
-- Table structure for system_node
-- ----------------------------
DROP TABLE IF EXISTS `system_node`;
CREATE TABLE `system_node` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `node` varchar(100) DEFAULT NULL COMMENT '节点代码',
  `title` varchar(500) DEFAULT NULL COMMENT '节点标题',
  `is_menu` tinyint(1) unsigned DEFAULT '0' COMMENT '是否可设置为菜单',
  `is_auth` tinyint(1) unsigned DEFAULT '1' COMMENT '是否启动RBAC权限控制',
  `is_login` tinyint(1) unsigned DEFAULT '1' COMMENT '是否启动登录控制',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_system_node_node` (`node`) USING BTREE,
  KEY `index_system_node_is_menu` (`is_menu`) USING BTREE,
  KEY `index_system_node_is_auth` (`is_auth`) USING BTREE,
  KEY `index_system_node_is_login` (`is_login`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8mb4 COMMENT='系统-节点';

-- ----------------------------
-- Records of system_node
-- ----------------------------
BEGIN;
INSERT INTO `system_node` VALUES (1, 'admin', '系统管理', 0, 1, 1, '2019-06-14 16:51:00');
INSERT INTO `system_node` VALUES (2, 'admin/auth/index', '系统权限管理', 1, 1, 1, '2019-06-14 16:51:01');
INSERT INTO `system_node` VALUES (3, 'admin/auth/apply', '权限配置节点', 0, 1, 1, '2019-06-14 16:51:01');
INSERT INTO `system_node` VALUES (4, 'admin/auth/add', '添加系统权限', 0, 1, 1, '2019-06-14 16:51:01');
INSERT INTO `system_node` VALUES (5, 'admin/auth/edit', '编辑系统权限', 0, 1, 1, '2019-06-14 16:51:02');
INSERT INTO `system_node` VALUES (6, 'admin/auth/forbid', '禁用系统权限', 0, 1, 1, '2019-06-14 16:51:02');
INSERT INTO `system_node` VALUES (7, 'admin/auth/resume', '启用系统权限', 0, 1, 1, '2019-06-14 16:51:02');
INSERT INTO `system_node` VALUES (8, 'admin/auth/remove', '删除系统权限', 0, 1, 1, '2019-06-14 16:51:02');
INSERT INTO `system_node` VALUES (9, 'admin/config/info', '系统参数配置', 1, 1, 1, '2019-06-14 16:51:03');
INSERT INTO `system_node` VALUES (10, 'admin/config/file', '文件存储配置', 1, 1, 1, '2019-06-14 16:51:04');
INSERT INTO `system_node` VALUES (11, 'admin/menu/index', '系统菜单管理', 1, 1, 1, '2019-06-14 16:51:07');
INSERT INTO `system_node` VALUES (12, 'admin/menu/add', '添加系统菜单', 0, 1, 1, '2019-06-14 16:51:07');
INSERT INTO `system_node` VALUES (13, 'admin/menu/edit', '编辑系统菜单', 0, 1, 1, '2019-06-14 16:51:07');
INSERT INTO `system_node` VALUES (14, 'admin/menu/resume', '启用系统菜单', 0, 1, 1, '2019-06-14 16:51:07');
INSERT INTO `system_node` VALUES (15, 'admin/menu/forbid', '禁用系统菜单', 0, 1, 1, '2019-06-14 16:51:07');
INSERT INTO `system_node` VALUES (16, 'admin/menu/remove', '删除系统菜单', 0, 1, 1, '2019-06-14 16:51:07');
INSERT INTO `system_node` VALUES (17, 'admin/message/index', '系统消息管理', 1, 1, 1, '2019-06-14 16:51:10');
INSERT INTO `system_node` VALUES (18, 'admin/message/read', '设置消息状态', 0, 1, 1, '2019-06-14 16:51:10');
INSERT INTO `system_node` VALUES (19, 'admin/message/clear', '清理所有消息', 0, 1, 1, '2019-06-14 16:51:10');
INSERT INTO `system_node` VALUES (20, 'admin/message/state', '设置消息开关', 0, 1, 1, '2019-06-14 16:51:10');
INSERT INTO `system_node` VALUES (21, 'admin/message/remove', '删除系统消息', 0, 1, 1, '2019-06-14 16:51:11');
INSERT INTO `system_node` VALUES (22, 'admin/node/index', '系统节点管理', 1, 1, 1, '2019-06-14 16:51:12');
INSERT INTO `system_node` VALUES (23, 'admin/node/clear', '清理无效的节点', 0, 1, 1, '2019-06-14 16:51:13');
INSERT INTO `system_node` VALUES (24, 'admin/node/save', '更新节点数据', 0, 1, 1, '2019-06-14 16:51:13');
INSERT INTO `system_node` VALUES (25, 'admin/oplog/index', '系统操作日志', 1, 1, 1, '2019-06-14 16:51:16');
INSERT INTO `system_node` VALUES (26, 'admin/oplog/clear', '清理系统日志', 0, 1, 1, '2019-06-14 16:51:16');
INSERT INTO `system_node` VALUES (27, 'admin/oplog/remove', '删除系统日志', 0, 1, 1, '2019-06-14 16:51:16');
INSERT INTO `system_node` VALUES (28, 'admin/queue/index', '系统消息任务', 1, 1, 1, '2019-06-14 16:51:19');
INSERT INTO `system_node` VALUES (29, 'admin/queue/redo', '重置失败的任务', 0, 1, 1, '2019-06-14 16:51:19');
INSERT INTO `system_node` VALUES (30, 'admin/queue/remove', '删除消息任务', 0, 1, 1, '2019-06-14 16:51:19');
INSERT INTO `system_node` VALUES (31, 'admin/user/index', '系统用户管理', 1, 1, 1, '2019-06-14 16:51:22');
INSERT INTO `system_node` VALUES (32, 'admin/user/auth', '用户授权管理', 0, 1, 1, '2019-06-14 16:51:22');
INSERT INTO `system_node` VALUES (33, 'admin/user/add', '添加系统用户', 0, 1, 1, '2019-06-14 16:51:22');
INSERT INTO `system_node` VALUES (34, 'admin/user/edit', '编辑系统用户', 0, 1, 1, '2019-06-14 16:51:22');
INSERT INTO `system_node` VALUES (35, 'admin/user/pass', '修改用户密码', 0, 1, 1, '2019-06-14 16:51:23');
INSERT INTO `system_node` VALUES (36, 'admin/user/forbid', '禁用系统用户', 0, 1, 1, '2019-06-14 16:51:23');
INSERT INTO `system_node` VALUES (37, 'admin/user/resume', '启用系统用户', 0, 1, 1, '2019-06-14 16:51:23');
INSERT INTO `system_node` VALUES (38, 'admin/user/remove', '删除系统用户', 0, 1, 1, '2019-06-14 16:51:23');
INSERT INTO `system_node` VALUES (106, 'admin/menu', '系统菜单管理', 0, 1, 1, '2019-06-26 20:23:20');
INSERT INTO `system_node` VALUES (107, 'admin/node', '系统节点管理', 0, 1, 1, '2019-06-27 08:33:26');
INSERT INTO `system_node` VALUES (108, 'admin/user', '系统用户管理', 0, 1, 1, '2019-06-27 08:33:37');
INSERT INTO `system_node` VALUES (109, 'admin/node/addnode', '添加节点测试', 0, 0, 0, '2019-06-27 10:53:09');
COMMIT;

-- ----------------------------
-- Table structure for system_user
-- ----------------------------
DROP TABLE IF EXISTS `system_user`;
CREATE TABLE `system_user` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(50) DEFAULT '' COMMENT '用户账号',
  `password` varchar(32) DEFAULT '' COMMENT '用户密码',
  `qq` varchar(16) DEFAULT '' COMMENT '联系QQ',
  `mail` varchar(32) DEFAULT '' COMMENT '联系邮箱',
  `phone` varchar(16) DEFAULT '' COMMENT '联系手机',
  `login_at` datetime DEFAULT NULL COMMENT '登录时间',
  `login_ip` varchar(255) DEFAULT '' COMMENT '登录IP',
  `login_num` bigint(20) unsigned DEFAULT '0' COMMENT '登录次数',
  `authorize` varchar(255) DEFAULT '' COMMENT '权限授权',
  `desc` varchar(255) DEFAULT '' COMMENT '备注说明',
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '状态(0:禁用,1:启用)',
  `is_deleted` tinyint(1) unsigned DEFAULT '0' COMMENT '删除(1:删除,0:未删)',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `index_system_user_username` (`username`) USING BTREE,
  KEY `index_system_user_status` (`status`) USING BTREE,
  KEY `index_system_user_deleted` (`is_deleted`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10002 DEFAULT CHARSET=utf8mb4 COMMENT='系统-用户';

-- ----------------------------
-- Records of system_user
-- ----------------------------
BEGIN;
INSERT INTO `system_user` VALUES (10000, 'admin', '21232f297a57a5a743894a0e4a801fc3', '22222222', '18191@qq.com', '13977889901', '2019-06-27 11:08:44', '0.0.0.0', 576, '', '', 1, 0, '2015-11-13 15:14:22');
INSERT INTO `system_user` VALUES (10001, 'jack001', '', '', '181@qq.com', '13777777777', NULL, '', 0, '2,3', '11', 1, 0, '2019-06-22 23:44:30');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
